import { IAttrParops } from '../types/attrType';
import { IToolProps } from '../types/toolType';

export const attr: IAttrParops = {
    text: '',
    icon: '',
    show: true,
    class: '',
    style: {
        fill: '#FFFFFF',
        fill_opacity: 1,
        stroke: '#166FFF',
        stroke_width: 2,
        stroke_dasharray: 0,
        stroke_opacity: 1,
        stroke_animation: '',
    },
    transform: {
        x: 0,
        y: 0,
        scale: 1,
        rotate: 0,
    },
};

export const dragAttr = {
    ...attr,
    style: {
        ...attr.style,
        width: 50,
        height: 50,
    }
};

export const draw: IToolProps = {
    title: '基本绘制',
    child: [
        {
            type: 'select',
            name: '选择',
            icon: 'send-outlined',
            path: 'M13 3 L40 25 L30 28 L37 40 L29 45 L22 32 L13 40 Z',
            attr: {},
            event: 1,
        },
        {
            type: 'line',
            name: '直线',
            tips: '按住 "Shift"键 绘制水平 或 垂直线条！',
            path: 'M4 20 L46 20 L46 30 L4 30 Z',
            icon: 'line-outlined',
            attr: {
                ...attr,
                style: {
                    ...attr.style,
                    // x1: 0,
                    // y1: 0,
                    x: 0,
                    y: 0,
                    x2: 50,
                    y2: 50,
                    stroke_width: 2,
                    stroke_linecap: 'butt',
                },
            },
            event: 1,
        },
        {
            type: 'pencil',
            name: '画笔',
            path: 'M6.34,35.96 V43.62 h7.65 L36.59,21.03 l-7.65,-7.65 L6.34,35.96 zM42.51,15.11 c0.79,-0.79 0.79,-2.08 0,-2.87 l-4.77,-4.77 c-0.79,-0.79 -2.08,-0.79 -2.87,0 l-3.73,3.73 l7.65,7.65 l3.73,-3.73 z',
            icon: 'stock-outlined',
            attr: {
                ...attr,
                style: {
                    ...attr.style,
                    fill: 'rgba(0%, 0%, 0%, 0)',
                    stroke_linecap: 'butt',
                },
                points: '',
            },
            event: 1,
        },
        {
            type: 'rect',
            name: '矩形',
            tips: '按住 "Shift"键 绘制正方形！',
            icon: 'border-outlined',
            path: 'M6 8 L44 8 L44 42 L6 42 Z',
            attr: {
                ...attr,
                style: {
                    ...attr.style,
                    x: 0,
                    y: 0,
                    rx: 0,
                    ry: 0,
                    width: 50,
                    height: 50,
                },
            },
            event: 1,
        },
        {
            type: 'polyline',
            name: '钢笔',
            tips: '点击鼠标键开始绘制，点击右键结束绘制！',
            icon: 'node-index-outlined',
            path: 'M21.78,3.33 c0,-0.69 1.87,0 1.87,0 V26.77 a2.83,2.51 0 1 0 1.91,0 V3.33 s1.89,-0.69 1.89,0 c0,13.19 11.38,22.62 11.38,22.62 l-7.08,15.88 h-14.28 l-7.11,-15.88 s11.38,-9.43 11.38,-22.62 zM11.97,47.12 v-3.87 h24.68 v3.87 z',
            attr: {
                ...attr,
                style: {
                    ...attr.style,
                    fill: 'rgba(0%, 0%, 0%, 0)',
                    stroke_linecap: 'butt',
                },
                points: '',
            },
            event: 1,
        },
        {
            // type: 'circle', 
            type: 'ellipse',
            name: '圆形',
            tips: '按住 "Shift"键 绘制正圆！',
            icon: 'loading3-quarters-outlined',
            path: 'M5 5 m20 0 a 20 20 0 1 0 1 0 Z',
            attr: {
                ...attr,
                style: {
                    ...attr.style,
                    cx: 0,
                    cy: 0,
                    // r: 50,
                    rx: 50,
                    ry: 50,
                },
            },
            event: 1,
        },
        {
            type: 'straw',
            name: '吸管',
            tips: '先选中要填充的组件后，再进行颜色吸取!',
            icon: 'bg-colors-outlined',
            path: 'M43.52,11.60 l-4.91,-4.91 c-0.81,-0.81 -2.14,-0.81 -2.96,0 l-6.55,6.55 l-4.05,-4.01 l-2.96,2.96 l2.98,2.98 L6.34,33.90 V43.88 h9.97 l18.72,-18.72 l2.98,2.98 l2.96,-2.96 l-4.03,-4.03 l6.55,-6.55 c0.83,-0.83 0.83,-2.16 0.02,-2.98 zM14.57,39.68 L10.54,35.65 l16.92,-16.92 l4.03,4.03 L14.57,39.68 z',
            attr: {
                ...attr,
            },
            event: 1,
        },
        {
            type: 'text',
            name: '文本',
            icon: 'font-size-outlined',
            path: 'M8 8 h35 v8 h-13 v27 h-8 v-27 h-14 Z',
            attr: {
                ...attr,
                style: {
                    ...attr.style,
                    x: 0,
                    y: 0,
                    fill: '#166FFF',
                    font_family: 'Microsoft YaHei',
                    font_size: 12,
                    font_weight: 'normal',
                    font_style: 'normal',
                    stroke_width: 0,
                    text_anchor: 'middle',
                    dominant_baseline: 'auto'
                }
            },
            event: 1,
            // template: '<text x="0" y="0" :fill="attr.style.fill">{{attr.text}}</text>'
            // template: {
            //     template: '<text x="0" y="0" fill="red">文本文本文本</text>'
            // },
            template: '<text x="0" y="0" fill="red">文本文本文本</text>',
        },
    ],
    forEach: function (arg0: (o: any) => any) {
        throw new Error('Function not implemented.');
    },
    filter: function (arg0: (o: any) => boolean) {
        throw new Error('Function not implemented.');
    }
};

export const shape = {
    title: '预设图形',
    child: [
        {
            type: 'path',
            name: '几何',
            icon: '',
            path: 'M2.44,19.51 L19.24,19.51 L24.44,3.55 L29.63,19.51 L46.44,19.51 L32.84,29.38 L38.03,45.35 L24.44,35.48 L10.84,45.35 L16.03,29.38 L2.44,19.51 z',
            attr: {
                ...dragAttr,
            },
            event: 2,
            child: [
                {
                    type: 'path',
                    name: '星形',
                    icon: '',
                    path: 'M2.44,19.51 L19.24,19.51 L24.44,3.55 L29.63,19.51 L46.44,19.51 L32.84,29.38 L38.03,45.35 L24.44,35.48 L10.84,45.35 L16.03,29.38 L2.44,19.51 z',
                    attr: {
                        ...dragAttr,
                    },
                    event: 2,
                },
                {
                    type: 'path',
                    name: '三角形',
                    icon: '',
                    path: 'M2.47,44.11 L25.04,5.49 L47.61,44.11 L2.47,44.11 z',
                    attr: {
                        ...dragAttr,
                    },
                    event: 2,
                },
                {
                    type: 'path',
                    name: '直角形',
                    icon: '',
                    path: 'M3.59,46.31 L3.59,3.31 L46.59,46.31 L3.59,46.31 z',
                    attr: {
                        ...dragAttr,
                    },
                    event: 2,
                },
                {
                    type: 'path',
                    name: '菱形',
                    icon: '',
                    path: 'M2.63,25.34 L24.63,3.34 L46.63,25.34 L24.63,47.34 L2.63,25.34 z',
                    attr: {
                        ...dragAttr,
                    },
                    event: 2,
                },
                {
                    type: 'path',
                    name: '五边形',
                    icon: '',
                    path: 'M3.60,20.22 L25.100605930486314,4.58 L46.60,20.22 L38.38,45.53 L11.81,45.53 L3.60,20.22 z',
                    attr: {
                        ...dragAttr,
                    },
                    event: 2,
                },
                {
                    type: 'path',
                    name: '六边形',
                    icon: '',
                    path: 'M2.86,25.23 L12.40,6.16 L37.82,6.16 L47.36,25.23 L37.82,44.30 L12.40,44.30 L2.86,25.23 z',
                    attr: {
                        ...dragAttr,
                    },
                    event: 2,
                },
            ],
        },
        {
            type: 'path',
            name: '物体',
            icon: '',
            path: 'M31.41,6.53 C30.36,9.11 27.84,10.94 24.89,10.94 C21.93,10.94 19.41,9.11 18.36,6.53 L2.39,13.31 L6.88,23.90 L11.82,21.81 L11.82,43.40 L38.13,43.40 L38.13,21.88 L42.89,23.90 L47.39,13.31 L31.41,6.53 L31.41,6.53 z',
            attr: {
                ...dragAttr,
            },
            event: 2,
            child: [
                {
                    type: 'path',
                    name: '衣物',
                    icon: '',
                    path: 'M31.41,6.53 C30.36,9.11 27.84,10.94 24.89,10.94 C21.93,10.94 19.41,9.11 18.36,6.53 L2.39,13.31 L6.88,23.90 L11.82,21.81 L11.82,43.40 L38.13,43.40 L38.13,21.88 L42.89,23.90 L47.39,13.31 L31.41,6.53 L31.41,6.53 z',
                    attr: {
                        ...dragAttr,
                    },
                    event: 2,
                },
            ],
        },
        {
            type: 'path',
            name: '箭头',
            icon: '',
            path: 'M23.15,36.77 L30.41,29.49 L16.38,29.49 L2.36,29.49 L2.36,24.99 L2.36,20.48 L16.22,20.48 C23.85,20.48 30.09,20.25 30.09,19.97 C30.09,19.69 27.05,16.42 23.34,12.69 L16.59,5.92 L22.83,5.92 L29.06,5.92 L38.59,15.46 L48.11,25.00 L38.57,34.53 L29.03,44.05 L22.46,44.05 L15.90,44.05 L23.15,36.77 L23.15,36.77 z',
            attr: {
                ...dragAttr,
            },
            event: 2,
            child: [
                {
                    type: 'path',
                    name: '向右',
                    icon: '',
                    path: 'M23.15,36.77 L30.41,29.49 L16.38,29.49 L2.36,29.49 L2.36,24.99 L2.36,20.48 L16.22,20.48 C23.85,20.48 30.09,20.25 30.09,19.97 C30.09,19.69 27.05,16.42 23.34,12.69 L16.59,5.92 L22.83,5.92 L29.06,5.92 L38.59,15.46 L48.11,25.00 L38.57,34.53 L29.03,44.05 L22.46,44.05 L15.90,44.05 L23.15,36.77 L23.15,36.77 z',
                    attr: {
                        ...dragAttr,
                    },
                    event: 2,
                },
            ],
        },
        {
            type: 'path',
            name: '标志',
            icon: '',
            path: 'M30.05,17.37 L25.15,16.50 L26.96,15.56 C27.95,15.04 28.85,14.54 28.95,14.45 C29.22,14.21 25.90,9.08 25.49,9.09 C25.30,9.09 24.03,11.08 22.65,13.50 C21.27,15.94 19.89,17.81 19.56,17.67 C15.69,16.11 12.53,14.53 12.538,14.15 C12.53,13.89 13.75,11.61 15.23,9.07 L17.93,4.45 L25.296,4.45 L32.65,4.45 L34.57,7.49 L36.49,10.52 L38.50,9.50 C39.88,8.78 40.41,8.68 40.22,9.167 C38.51,13.40 35.96,18.35 35.51,18.30 C35.20,18.26 32.74,17.85 30.05,17.37 L30.05,17.37 zM7.22,36.28 C5.36,33.08 3.69,30.07 3.51,29.61 C3.33,29.13 3.86,27.44 4.73,25.71 L6.28,22.66 L4.70,21.73 C2.60,20.49 3.38,20.10 8.95,19.65 L13.35,19.28 L15.07,23.84 C16.02,26.35 16.92,28.73 17.07,29.12 C17.22,29.54 16.48,29.26 15.33,28.48 L13.32,27.11 L11.92,29.82 C11.15,31.31 10.51,32.69 10.500,32.89 C10.48,33.100 12.85,33.33 15.756,33.41 L21.03,33.55 L21.38,37.42 C21.57,39.54 21.68,41.31 21.63,41.34 C21.59,41.38 19.09,41.57 16.08,41.76 L10.61,42.11 L7.22,36.28 L7.22,36.28 zM28.07,41.95 C24.87,37.12 24.81,37.48 29.57,32.27 L32.62,28.92 L32.29,31.37 L31.97,33.81 L35.39,33.81 C37.27,33.81 38.81,33.66 38.81,33.48 C38.81,33.29 37.76,31.23 36.49,28.89 C35.21,26.57 34.17,24.44 34.18,24.20 C34.19,23.66 40.88,19.23 41.19,19.54 C41.32,19.67 42.56,21.91 43.95,24.53 L46.48,29.28 L43.08,34.77 C41.21,37.78 39.41,40.55 39.08,40.91 C38.76,41.27 36.93,41.70 35.03,41.88 C31.40,42.22 31.50,42.14 30.97,45.24 C30.88,45.78 29.79,44.55 28.07,41.95 L28.07,41.95 z',
            attr: {
                ...dragAttr,
            },
            event: 2,
            child: [
                {
                    type: 'path',
                    name: '回收利用',
                    icon: '',
                    path: 'M30.05,17.37 L25.15,16.50 L26.96,15.56 C27.95,15.04 28.85,14.54 28.95,14.45 C29.22,14.21 25.90,9.08 25.49,9.09 C25.30,9.09 24.03,11.08 22.65,13.50 C21.27,15.94 19.89,17.81 19.56,17.67 C15.69,16.11 12.53,14.53 12.538,14.15 C12.53,13.89 13.75,11.61 15.23,9.07 L17.93,4.45 L25.296,4.45 L32.65,4.45 L34.57,7.49 L36.49,10.52 L38.50,9.50 C39.88,8.78 40.41,8.68 40.22,9.167 C38.51,13.40 35.96,18.35 35.51,18.30 C35.20,18.26 32.74,17.85 30.05,17.37 L30.05,17.37 zM7.22,36.28 C5.36,33.08 3.69,30.07 3.51,29.61 C3.33,29.13 3.86,27.44 4.73,25.71 L6.28,22.66 L4.70,21.73 C2.60,20.49 3.38,20.10 8.95,19.65 L13.35,19.28 L15.07,23.84 C16.02,26.35 16.92,28.73 17.07,29.12 C17.22,29.54 16.48,29.26 15.33,28.48 L13.32,27.11 L11.92,29.82 C11.15,31.31 10.51,32.69 10.500,32.89 C10.48,33.100 12.85,33.33 15.756,33.41 L21.03,33.55 L21.38,37.42 C21.57,39.54 21.68,41.31 21.63,41.34 C21.59,41.38 19.09,41.57 16.08,41.76 L10.61,42.11 L7.22,36.28 L7.22,36.28 zM28.07,41.95 C24.87,37.12 24.81,37.48 29.57,32.27 L32.62,28.92 L32.29,31.37 L31.97,33.81 L35.39,33.81 C37.27,33.81 38.81,33.66 38.81,33.48 C38.81,33.29 37.76,31.23 36.49,28.89 C35.21,26.57 34.17,24.44 34.18,24.20 C34.19,23.66 40.88,19.23 41.19,19.54 C41.32,19.67 42.56,21.91 43.95,24.53 L46.48,29.28 L43.08,34.77 C41.21,37.78 39.41,40.55 39.08,40.91 C38.76,41.27 36.93,41.70 35.03,41.88 C31.40,42.22 31.50,42.14 30.97,45.24 C30.88,45.78 29.79,44.55 28.07,41.95 L28.07,41.95 z',
                    attr: {
                        ...dragAttr,
                    },
                    event: 2,
                },
                {
                    type: 'path',
                    name: '转盘',
                    icon: '',
                    path: 'M7.496031759928458,16.849556422397068 C7.497006160575767,16.478693065369562 7.828976412773436,14.204843134726541 8.234010904616726,11.796531505878203 C9.496974985364455,4.28697213214953 9.515553270261698,4.253832411125316 11.119081874398066,6.647295191472395 L12.06779456072708,8.063369741891304 L14.842298363316424,6.6627965155078925 C18.512098151292374,4.810290565551217 22.891021602858512,4.124985739159891 26.916273548883904,4.773231679810469 C28.62494975555389,5.048416829310797 30.43798024741583,5.495685933702415 30.945233391176153,5.767160308248237 C31.952331072008725,6.306128094277598 31.88777487340804,6.768987627293805 30.28264957440654,10.517768563321082 C29.402916693154722,12.57240970918777 29.31847294861076,12.630967232631024 27.798833341746594,12.24032840566513 C25.212354371919826,11.57548170533128 21.000820879244415,11.784893296899368 18.967473802213515,12.679460249099266 L17.06101438462247,13.518231920094127 L18.399208518842304,14.91500382976286 C19.135218741869487,15.683249219058144 19.552160179668967,16.426282321353778 19.325754309042317,16.566203831352112 C19.09933981540065,16.706129652865133 16.344677569343293,16.978850054476126 13.204287761071434,17.17222569447889 C8.492638106364215,17.462377540484248 7.494748367926821,17.40598583340724 7.496033197097908,16.849557859568755 L7.496031759928458,16.849556422397068 zM31.757334531963608,37.55494914993475 L29.716287102918322,34.85161797764767 L31.57467321426602,33.054582508298715 C33.4873756944069,31.20504719034367 34.86684388788053,28.608319597856934 35.474579583289916,25.713305772746278 L35.82139579224395,24.061243468688474 L33.821076298195614,24.38109157452922 C32.720898923724704,24.55703145862379 31.81398630053878,24.534170383021134 31.805715392394966,24.33031201934848 C31.767087161446007,23.37854998160416 36.99785091645783,13.9963240262119 37.50628685038264,14.10539379107051 C38.30572796860925,14.276884194430377 46.4165196670466,21.301759159673423 46.4165196670466,21.822641588603805 C46.4165196670466,22.05512551987874 45.56410449596156,22.381653595505302 44.5222790611056,22.548246120845274 L42.62803414365701,22.851134174308147 L42.441081439040495,26.081319220117233 C42.20129552413382,30.224158012395826 40.01825722562419,35.00555908860779 36.9788587268606,38.04495252747805 C35.76151901621874,39.26230659976391 34.54790588504109,40.25831050280828 34.281947683736384,40.25831050280828 C34.0159822965876,40.25831050280828 32.8799101867882,39.041789989575335 31.757334531963608,37.55495058710525 L31.757334531963608,37.55494914993475 zM13.332782175561283,45.13218489570813 C13.332782175561283,44.83327349379559 13.653441906977193,43.96863706026694 14.045357919317311,43.210753672299035 C14.756418886846319,41.83571753351141 14.75230283455668,41.829041875237095 12.101418568884284,40.068947443624594 C7.953915270920358,37.31516151675269 4.871071150401465,32.4273595018203 3.9013815439552184,27.06788234830443 L3.5834768656949842,25.31081459835575 L5.850145471041072,25.00014426511958 C10.52262077054357,24.35970934765891 10.56528888381978,24.37906803807052 11.50106848545774,27.563641594825796 C12.132533279802388,29.712592761634802 12.90917658466587,31.000415628790357 14.58333773833807,32.67457155925327 C15.81428744031476,33.90552845297349 16.993420010554,34.80636146977497 17.20363617131999,34.676444105577325 C17.413843709071088,34.54652961572097 17.71810390393957,33.778879215131376 17.87977249266026,32.970545384090514 C18.0414396442113,32.1622115530502 18.378550650264017,31.50083993166338 18.628905506698196,31.50083993166338 C19.203689789085693,31.50083993166338 24.616422146292322,40.035297526974 24.702353360849653,41.07706669634709 C24.759740960001672,41.77285424641049 21.83376240908602,42.977555467145386 14.208213609710139,45.39780711083616 C13.721971878126691,45.55212907205477 13.332783612730061,45.43406549245306 13.332783612730061,45.13218345853809 L13.332782175561283,45.13218489570813 z',
                    attr: {
                        ...dragAttr,
                    },
                    event: 2,
                },
            ],
        },
        {
            type: 'path',
            name: '棋牌',
            icon: '',
            path: 'M16.92,44.08 C19.54,41.63 21.46,38.52 23.06,35.38 C24.04,34.12 23.11,33.02 21.78,34.09 C18.35,36.31 13.67,37.07 9.95,35.04 C5.75,32.94 3.86,27.93 4.81,23.56 C5.42,19.14 8.74,15.67 12.34,13.118 C16.48,10.31 20.95,7.85 24.74,4.52 C26.32,4.55 27.51,6.96 29.21,7.59 C33.73,10.85 39.08,13.25 42.63,17.61 C44.43,20.40 45.45,23.16 45.57,26.18 C45.02,30.29 42.50,34.61 38.15,35.78 C34.39,36.88 30.52,35.48 27.24,33.70 C26.84,33.62 25.37,32.50 25.95,33.37 C27.91,37.27 30.06,41.14 33.17,44.30 C33.35,44.70 34.79,45.65 34.02,45.64 C27.64,45.64 21.26,45.64 14.87,45.64 C15.55,45.12 16.24,44.60 16.92,44.08 L16.92,44.08 z',
            attr: {
                ...dragAttr,
            },
            event: 2,
            child: [
                {
                    type: 'path',
                    name: '桃心',
                    icon: '',
                    path: 'M16.92,44.08 C19.54,41.63 21.46,38.52 23.06,35.38 C24.04,34.12 23.11,33.02 21.78,34.09 C18.35,36.31 13.67,37.07 9.95,35.04 C5.75,32.94 3.86,27.93 4.81,23.56 C5.42,19.14 8.74,15.67 12.34,13.118 C16.48,10.31 20.95,7.85 24.74,4.52 C26.32,4.55 27.51,6.96 29.21,7.59 C33.73,10.85 39.08,13.25 42.63,17.61 C44.43,20.40 45.45,23.16 45.57,26.18 C45.02,30.29 42.50,34.61 38.15,35.78 C34.39,36.88 30.52,35.48 27.24,33.70 C26.84,33.62 25.37,32.50 25.95,33.37 C27.91,37.27 30.06,41.14 33.17,44.30 C33.35,44.70 34.79,45.65 34.02,45.64 C27.64,45.64 21.26,45.64 14.87,45.64 C15.55,45.12 16.24,44.60 16.92,44.08 L16.92,44.08 z',
                    attr: {
                        ...dragAttr,
                    },
                    event: 2,
                },
            ],
        },
        {
            type: 'path',
            name: '音乐',
            icon: '',
            path: 'M15.50,46.72 C13.62,46.41 11.88,44.68 12.24,42.67 C12.42,40.47 14.17,38.69 15.93,37.52 C18.28,35.92 21.48,35.33 24.08,36.71 C24.24,25.58 24.15,14.46 24.17,3.33 C25.80,2.94 25.28,5.07 25.65,6.06 C26.09,8.97 27.95,11.25 29.89,13.28 C32.30,15.84 34.85,18.55 35.64,22.10 C36.48,26.22 35.12,30.43 33.35,34.11 C33.22,35.30 31.06,37.01 32.09,34.87 C33.83,31.22 35.26,27.01 34.08,22.97 C32.95,18.93 29.42,15.56 25.23,14.95 C25.20,23.48 25.30,32.00 25.13,40.52 C24.72,43.03 22.54,44.90 20.35,45.96 C18.84,46.62 17.14,47.01 15.50,46.72 L15.50,46.72 z',
            attr: {
                ...dragAttr,
            },
            event: 2,
            child: [
                {
                    type: 'path',
                    name: '八分音符',
                    icon: '',
                    path: 'M15.50,46.72 C13.62,46.41 11.88,44.68 12.24,42.67 C12.42,40.47 14.17,38.69 15.93,37.52 C18.28,35.92 21.48,35.33 24.08,36.71 C24.24,25.58 24.15,14.46 24.17,3.33 C25.80,2.94 25.28,5.07 25.65,6.06 C26.09,8.97 27.95,11.25 29.89,13.28 C32.30,15.84 34.85,18.55 35.64,22.10 C36.48,26.22 35.12,30.43 33.35,34.11 C33.22,35.30 31.06,37.01 32.09,34.87 C33.83,31.22 35.26,27.01 34.08,22.97 C32.95,18.93 29.42,15.56 25.23,14.95 C25.20,23.48 25.30,32.00 25.13,40.52 C24.72,43.03 22.54,44.90 20.35,45.96 C18.84,46.62 17.14,47.01 15.50,46.72 L15.50,46.72 z',
                    attr: {
                        ...dragAttr,
                    },
                    event: 2,
                }, 
                {
                    type: 'path',
                    name: '16分音符',
                    icon: '',
                    path: 'M15.552258336226224,47.75422692500781 C13.422001769576665,47.320593366563415 11.813826795495864,45.220519140829 12.347193627227876,43.03703731776876 C13.101536584264936,39.97369397642719 15.959476975047814,37.85464527050575 18.819678097134812,36.84753977998178 C20.724874488240484,36.21483149448455 22.88685496261434,36.31047435477845 24.675767193461297,37.25124206667848 C24.835507121657084,25.550564321958277 24.74429052718695,13.846936730846323 24.768547729004514,2.144936006110381 C25.41427275312076,2.144777923812036 26.242888330691905,1.936316484729069 26.067438391878966,2.8714269990264665 C26.15754073588938,4.972775091827371 27.19024985603937,6.896449424309273 28.77731699737105,8.251969836022871 C32.31788773811005,11.550567263913376 36.30067010731999,15.132432823339183 37.11398392582049,20.159782970253637 C37.34486398806473,22.28073173331839 37.09741443826468,24.418245372599443 36.62623229783402,26.48942737237578 C38.02160231664934,29.09370739209205 37.93752091555119,32.248944127164584 37.37093836969486,35.07351413233623 C37.00353806962431,36.5650175513316 36.4042739131708,38.00180147327239 35.64250261973427,39.332304977515946 C33.843830721290786,40.169585570590925 35.85569587440236,37.9637803782575 35.83046255234774,37.16914517113016 C36.80335514711788,34.78195358662449 36.914962831961404,32.12282821792665 36.47245652568165,29.60824378755636 C35.50848867805266,25.92974850455476 31.864157583878033,24.132424902590422 28.93353767445896,22.209192586633154 C27.873167209901965,21.794228087235936 25.606568439934225,19.291484481475614 26.056015022494478,21.743921081528775 C25.95778141273055,28.3916976685652 25.974555026059868,35.04043349285104 25.943782682090045,41.68872116149386 C24.713630222175432,44.7709821961772 21.89157299358779,47.123325075098805 18.613742818259055,47.71318998807965 C17.609556054235203,47.88672444782056 16.55791081538753,47.95018451469471 15.552256801446042,47.754229994566614 L15.552258336226224,47.75422692500781 zM35.989950776582674,22.618705548893352 C36.019174527282296,18.835430862643832 33.20115070118589,15.77442192107279 30.439861561731778,13.530861150595243 C29.058137274099828,12.489158658342866 27.594524786345126,11.38554929617014 26.040829906721882,10.711337500746666 C26.136392998854568,12.886884513280162 27.131906719697664,15.006625404800332 28.32351317368745,16.81326204937327 C30.56912382376589,19.82206853243058 33.959333678403375,21.834638834087233 35.840475458683976,25.14745906452503 C36.06604671605109,24.324941516415223 35.9980068381039,23.46167403516425 35.989950776582674,22.618705548893352 z',
                    attr: {
                        ...dragAttr,
                    },
                    event: 2,
                },
                {
                    type: 'path',
                    name: '高音普号',
                    icon: '',
                    path: 'M23.64433316978981,46.82066837283922 C20.004256867986758,46.35379230247338 18.03884419117832,41.98951375031721 21.67602602301273,40.3908060086684 C25.46769950461445,38.81445942325951 27.72276370866183,44.426194623798004 23.581062065054713,44.97470305960957 C21.3131891465844,45.66022367486785 26.52553057839523,46.80821620287459 27.497018791236272,45.655518932388006 C30.532576365799656,44.4700181286008 30.0636576215598,41.38450420109134 29.33331801963695,39.21146866801723 C29.079861063236834,37.54670887629433 28.762897426943162,35.764438084805526 26.159678705173054,36.71057461656235 C19.879199329863244,37.11828851340784 14.906945507676113,31.9773811901036 15.406383104986286,27.168080855229956 C15.575944260231001,22.631841239543434 20.181073372875332,19.52489590603036 23.591058486889768,16.374806330565445 C22.471552375725697,12.253700932152979 22.133527589811337,7.4926945651838315 25.378869408281947,3.9014657614750434 C28.36820677154713,0.9821914709224385 29.88552262625021,6.324225430148486 30.391181964370205,8.136920124776594 C31.514380579178876,12.374091063395678 29.2748168553171,16.82668410036688 25.54822238082853,19.81353104676836 C25.904055918247412,21.230311273858447 26.254166257633592,22.64803893264734 26.616794951363865,24.063699333779187 C30.554864697640497,23.450224784381962 34.313933846862966,26.135156338253886 34.52872725867199,29.280047563744176 C35.13722154497915,32.119932087677945 32.879717585803554,34.80184453182813 29.79619581330489,36.02234579063135 C29.745492369342323,38.46098930644946 31.41553214704316,40.990592159181276 30.815463781515454,43.50884351298898 C30.239186680815664,46.112490436844205 26.620284750802377,47.389245268586755 23.644334995953894,46.82066837283922 L23.64433316978981,46.82066837283922 zM27.755545178950655,35.71020756586705 C28.8712638259413,34.02035483194821 26.847507034918568,31.035953821192262 26.73639408523729,28.86681852405441 C26.780094190190386,25.084310185580154 21.807451395067314,29.59952801581104 23.286207796528316,31.457029009865884 C23.724556555105043,32.55615734280239 27.52934189435667,34.571786602892885 24.034345192971454,33.32866780664353 C20.385475911421295,31.5665966126042 20.552602790029788,27.032878078778992 23.88662130705534,25.118606329006674 C26.683743950431417,24.61869391941732 24.975367511498682,21.607026620033352 24.448320140398668,20.61780183762268 C21.012858212167615,23.144012796465127 17.118910414732262,26.32501840910892 17.711392894928807,30.413710739850963 C18.15768911931223,34.24602333781812 23.33548318022863,36.5708291777044 27.755545178950655,35.710209039322216 L27.755545178950655,35.71020756586705 zM30.067070722109683,34.978712201201944 C33.343689251718246,33.281486297421196 33.23615558351251,28.827238570251218 29.651297003124668,27.445740228121892 C25.82623393861601,25.814943578948487 28.446158408823727,30.087356619237806 28.51624475767445,31.713588504176165 C29.047085071439916,32.33613069692466 28.746385251891482,35.963612392576565 30.067070722109683,34.978712201201944 zM26.028817617800023,14.561391116340536 C28.044353018413297,12.594076452527538 30.34832737335735,9.753881029544848 28.9328274673195,7.1528303337664765 C25.884556138862088,5.529290451493477 24.190608221836293,9.918757720434114 24.115640536565287,11.840809313705822 C24.087908409786436,13.087110773204916 23.860277064930198,17.38289870691742 26.028819443964014,14.561391116340536 L26.028819443964014,14.561391116340536 L26.028817617800023,14.561391116340536 z',
                    attr: {
                        ...dragAttr,
                    },
                    event: 2,
                },
            ],
        },
        {
            type: 'path',
            name: '流程图',
            icon: '',
            path: 'M4.75,10.26 C18.32,-5.71 31.90,26.24 45.47,10.26 L45.47,39.03 C31.90,55.01 18.32,23.05 4.75,39.03 L4.75,10.26 z',
            attr: {
                ...dragAttr,
            },
            event: 2,
            child: [
                {
                    type: 'path',
                    name: '波浪框',
                    icon: '',
                    path: 'M4.75,10.26 C18.32,-5.71 31.90,26.24 45.47,10.26 L45.47,39.03 C31.90,55.01 18.32,23.05 4.75,39.03 L4.75,10.26 z',
                    attr: {
                        ...dragAttr,
                    },
                    event: 2,
                },
            ],
        },
        {
            type: 'path',
            name: '对话框',
            icon: '',
            path: 'M4.35,10.41 L4.35,10.41 C4.35,7.72 6.47,5.55 9.10,5.55 L11.24,5.55 L11.24,5.55 L21.60,5.55 L41.01,5.55 C42.27,5.55 43.48,6.06 44.36,6.97 C45.25,7.88 45.75,9.12 45.75,10.41 L45.75,22.55 L45.75,22.55 L45.75,29.84 L45.75,29.84 C45.75,32.52 43.63,34.70 41.01,34.70 L21.60,34.70 L8.08,47.05 L11.25,34.70 L9.10,34.70 C6.47,34.70 4.35,32.52 4.35,29.84 L4.35,29.84 L4.35,22.55 L4.35,22.55 L4.35,10.41 z',
            attr: {
                ...dragAttr,
            },
            event: 2,
            child: [
                {
                    type: 'path',
                    name: '圆角框',
                    icon: '',
                    path: 'M4.35,10.41 L4.35,10.41 C4.35,7.72 6.47,5.55 9.10,5.55 L11.24,5.55 L11.24,5.55 L21.60,5.55 L41.01,5.55 C42.27,5.55 43.48,6.06 44.36,6.97 C45.25,7.88 45.75,9.12 45.75,10.41 L45.75,22.55 L45.75,22.55 L45.75,29.84 L45.75,29.84 C45.75,32.52 43.63,34.70 41.01,34.70 L21.60,34.70 L8.08,47.05 L11.25,34.70 L9.10,34.70 C6.47,34.70 4.35,32.52 4.35,29.84 L4.35,29.84 L4.35,22.55 L4.35,22.55 L4.35,10.41 z',
                    attr: {
                        ...dragAttr,
                    },
                    event: 2,
                },
            ],
        },
        {
            type: 'path',
            name: '天气时间',
            icon: '',
            path: 'M47.12,25.15 L38.17,28.34 L38.17,21.98 L47.12,25.15 zM40.62,9.48 L36.55,18.06 L32.05,13.56 L40.62,9.48 zM24.95,2.99 L28.13,11.94 L21.77,11.94 L24.95,2.99 zM9.28,9.48 L17.85,13.56 L13.35,18.06 L9.28,9.48 zM2.79,25.15 L11.73,21.98 L11.73,28.34 L2.79,25.15 zM9.28,40.83 L13.35,32.25 L17.85,36.75 L9.28,40.83 L9.28,40.83 zM24.95,47.32 L21.77,38.38 L28.13,38.38 L24.95,47.32 zM40.62,40.83 L32.05,36.75 L36.55,32.26 L40.62,40.83 zM13.87,25.15 L13.87,25.15 C13.87,19.03 18.83,14.07 24.95,14.07 C31.07,14.07 36.04,19.03 36.04,25.15 C36.04,31.28 31.07,36.24 24.95,36.24 C18.83,36.24 13.87,31.28 13.87,25.15 L13.87,25.15 z',
            attr: {
                ...dragAttr,
            },
            event: 2,
            child: [
                {
                    type: 'path',
                    name: '晴天',
                    icon: '',
                    path: 'M47.12,25.15 L38.17,28.34 L38.17,21.98 L47.12,25.15 zM40.62,9.48 L36.55,18.06 L32.05,13.56 L40.62,9.48 zM24.95,2.99 L28.13,11.94 L21.77,11.94 L24.95,2.99 zM9.28,9.48 L17.85,13.56 L13.35,18.06 L9.28,9.48 zM2.79,25.15 L11.73,21.98 L11.73,28.34 L2.79,25.15 zM9.28,40.83 L13.35,32.25 L17.85,36.75 L9.28,40.83 L9.28,40.83 zM24.95,47.32 L21.77,38.38 L28.13,38.38 L24.95,47.32 zM40.62,40.83 L32.05,36.75 L36.55,32.26 L40.62,40.83 zM13.87,25.15 L13.87,25.15 C13.87,19.03 18.83,14.07 24.95,14.07 C31.07,14.07 36.04,19.03 36.04,25.15 C36.04,31.28 31.07,36.24 24.95,36.24 C18.83,36.24 13.87,31.28 13.87,25.15 L13.87,25.15 z',
                    attr: {
                        ...dragAttr,
                    },
                    event: 2,
                },
            ],
        },
        {
            type: 'path',
            name: '交互界面',
            icon: '',
            path: 'M32.64,18.59 C32.64,18.59 34.02,12.54 32.64,10.49 C31.27,8.44 30.72,7.08 27.69,6.10 S25.76,5.32 23.56,5.42 C21.36,5.51 19.53,6.78 19.53,7.46 C19.53,7.46 18.15,7.56 17.60,8.15 C17.05,8.73 16.13,11.47 16.13,12.15 S16.59,17.42 17.05,18.40 L16.50,18.59 C16.05,24.26 18.34,24.94 18.34,24.94 C19.16,30.21 19.99,27.97 19.99,29.33 S19.16,30.21 19.16,30.21 S18.43,32.36 16.60,33.14 C14.76,33.92 4.58,38.12 3.75,39.00 C2.92,39.88 3.02,43.98 3.02,43.98 L46.68,43.98 C46.68,43.98 46.77,39.88 45.95,39.00 C45.12,38.12 34.94,33.92 33.10,33.14 C31.27,32.36 30.53,30.21 30.53,30.21 S29.71,30.70 29.71,29.33 S30.53,30.21 31.36,24.94 C31.36,24.94 33.65,24.26 33.20,18.59 L32.64,18.59 z',
            attr: {
                ...dragAttr,
            },
            event: 2,
            child: [
                {
                    type: 'path',
                    name: '用户',
                    icon: '',
                    path: 'M32.64,18.59 C32.64,18.59 34.02,12.54 32.64,10.49 C31.27,8.44 30.72,7.08 27.69,6.10 S25.76,5.32 23.56,5.42 C21.36,5.51 19.53,6.78 19.53,7.46 C19.53,7.46 18.15,7.56 17.60,8.15 C17.05,8.73 16.13,11.47 16.13,12.15 S16.59,17.42 17.05,18.40 L16.50,18.59 C16.05,24.26 18.34,24.94 18.34,24.94 C19.16,30.21 19.99,27.97 19.99,29.33 S19.16,30.21 19.16,30.21 S18.43,32.36 16.60,33.14 C14.76,33.92 4.58,38.12 3.75,39.00 C2.92,39.88 3.02,43.98 3.02,43.98 L46.68,43.98 C46.68,43.98 46.77,39.88 45.95,39.00 C45.12,38.12 34.94,33.92 33.10,33.14 C31.27,32.36 30.53,30.21 30.53,30.21 S29.71,30.70 29.71,29.33 S30.53,30.21 31.36,24.94 C31.36,24.94 33.65,24.26 33.20,18.59 L32.64,18.59 z',
                    attr: {
                        ...dragAttr,
                    },
                    event: 2,
                },
            ],
        },
    ],
};

export const topo: IToolProps = {
    title: '拓扑组件',
    child: [
        {
            type: 'image',
            name: '互联网',
            icon: 'internet',
            path: '',
            attr: {
                ...dragAttr,
            },
            event: 2,
            // template: '<image href="icon/tool/internet.webp" width="50" height="50"></image>',
            // props: [
            //     'props_attr'
            // ],
        },
        {
            type: 'image',
            name: '访问人',
            icon: 'visitor',
            path: '',
            attr: {
                ...dragAttr,
            },
            event: 2,
        },
        {
            type: 'image',
            name: 'PC端',
            icon: 'computer',
            path: '',
            attr: {
                ...dragAttr,
            },
            event: 2,
        },
        {
            type: 'image',
            name: '移动端',
            icon: 'phone',
            path: '',
            attr: {
                ...dragAttr,
            },
            event: 2,
        },
        {
            type: 'image',
            name: '终端',
            icon: 'terminal',
            path: '',
            attr: {
                ...dragAttr,
            },
            event: 2,
        },
        {
            type: 'image',
            name: '交换机',
            icon: 'switch',
            path: '',
            attr: {
                ...dragAttr,
            },
            event: 2,
        },
        {
            type: 'image',
            name: '核心交换机',
            icon: 'core-switch',
            path: '',
            attr: {
                ...dragAttr,
            },
            event: 2,
        },
        {
            type: 'image',
            name: '防火墙',
            icon: 'firewall',
            path: '',
            attr: {
                ...dragAttr,
            },
            event: 2,
        },
        {
            type: 'image',
            name: '流量监控',
            icon: 'flow-monitor',
            path: '',
            attr: {
                ...dragAttr,
            },
            event: 2,
        },
        {
            type: 'image',
            name: '服务器',
            icon: 'server',
            path: '',
            attr: {
                ...dragAttr,
            },
            event: 2,
        },
        {
            type: 'image',
            name: '虚拟机',
            icon: 'virtual-machine',
            path: '',
            attr: {
                ...dragAttr,
            },
            event: 2,
        },
        {
            type: 'image',
            name: '负载均衡',
            icon: 'load-balancing',
            path: '',
            attr: {
                ...dragAttr,
            },
            event: 2,
        },
        {
            type: 'image',
            name: '信号链路',
            icon: 'signal-link',
            path: '',
            attr: {
                ...dragAttr,
            },
            event: 2,
        },
        {
            type: 'image',
            name: '系统',
            icon: 'system',
            path: '',
            attr: {
                ...dragAttr,
            },
            event: 2,
        },
        {
            type: 'image',
            name: '传统设备',
            icon: 'tradition-device',
            path: '',
            attr: {
                ...dragAttr,
            },
            event: 2,
        },
        {
            type: 'image',
            name: '插头',
            icon: 'plug',
            path: '',
            attr: {
                ...dragAttr,
            },
            event: 2,
        },
        {
            type: 'image',
            name: '电池',
            icon: 'battery',
            path: '',
            attr: {
                ...dragAttr,
            },
            event: 2,
        },
        {
            type: 'image',
            name: '服务',
            icon: 'serve',
            path: '',
            attr: {
                ...dragAttr,
            },
            event: 2,
        },
        {
            type: 'image',
            name: '数据库',
            icon: 'data-base',
            path: '',
            attr: {
                ...dragAttr,
            },
            event: 2,
        },
        {
            type: 'image',
            name: '缓存',
            icon: 'redis',
            path: '',
            attr: {
                ...dragAttr,
            },
            event: 2,
        },
        {
            type: 'image',
            name: '存储',
            icon: 'storage',
            path: '',
            attr: {
                ...dragAttr,
            },
            event: 2,
        },
        {
            type: 'image',
            name: '信号流',
            icon: 'signal-flow',
            path: '',
            attr: {
                ...dragAttr,
            },
            event: 2,
        },
        {
            type: 'image',
            name: '集群',
            icon: 'colony',
            path: '',
            attr: {
                ...dragAttr,
            },
            event: 2,
        },
        {
            type: 'image',
            name: '单体',
            icon: 'monomer',
            path: '',
            attr: {
                ...dragAttr,
            },
            event: 2,
        },
        {
            type: 'image',
            name: '冗余组',
            icon: 'redundancy-group',
            path: '',
            attr: {
                ...dragAttr,
            },
            event: 2,
        },
        {
            type: 'image',
            name: '坐标',
            icon: 'coordinate',
            path: '',
            attr: {
                ...dragAttr,
            },
            event: 2,
        },
    ],
    forEach: function (arg0: (o: any) => any) {
        throw new Error('Function not implemented.');
    },
    filter: function (arg0: (o: any) => boolean) {
        throw new Error('Function not implemented.');
    }
};

export default [
    draw,
    shape,
    topo,
    {
        title: '其他控件',
        child: [

        ],
    },
];